﻿/*
 * 血糖检查glucose表的业务逻辑
 * */
using System;
using System.Collections.Generic;
using System.Text;
using WH.NurseSys.Model;
using WH.NurseSys.DAL;

namespace WH.NurseSys.BLL
{
    public class GlucoseBLL
    {
        //插入一条新的血糖数据
        public bool Insert(Glucose glucose)
        {
            return new GlucoseDAL().Insert(glucose);
        }

        //更新一条数据
        public bool Update(Glucose glucose)
        {
            return new GlucoseDAL().Update(glucose);
        }

        //删除一条数据
        public bool Delete(Guid id)
        {
            return new GlucoseDAL().Delete(id);
        }

        //查询一条数据
        public Glucose GetById(Guid id)
        {
            return null;
        }

        //判断数据是否已存在
        public bool Exist(Guid id)
        {
            if (new GlucoseDAL().GetById(id) == null)
                return false;
            else
                return true;
        }

        //获取一个人的数据列表
        public List<Glucose> GetListByPatient(Guid patientId)
        {
            return new GlucoseDAL().GetListByPatient(patientId);
        }
    }
}
